/*
 Copyright (c) 2011, fisamo
 All rights reserved.

 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:

 Redistributions of source code must retain the above copyright notice, this
 list of conditions and the following disclaimer.
 Redistributions in binary form must reproduce the above copyright notice, this
 list of conditions and the following disclaimer in the documentation and/or
 other materials provided with the distribution.
 Neither the name of the fisamo nor the names of its contributors may be used
 to endorse or promote products derived from this software without specific
 prior written permission.

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#ifndef SOURCE_DEFS_H_
#define SOURCE_DEFS_H_

#include <stdint.h>

#ifdef __cplusplus
	#include <vector>
	#include <list>
	#include <iomanip>
	#include <iostream>  // NOLINT(readability/streams)
	#include <cmath>

#endif  // __cplusplus

#include "opencv/cv.h"

typedef int 			INT;
typedef unsigned int 	UINT;
typedef int16_t			SHORT;
typedef uint16_t	    USHORT;
typedef float 			FLOAT;
typedef double 			DOUBLE;
typedef char 			CHAR;
typedef unsigned char 	UCHAR;
typedef void 			VOID;
typedef bool 			BOOL;
#define FALSE			false
#define TRUE			true

typedef INT 			Pixel;
typedef FLOAT 			PointStrength;
typedef FLOAT 			Tolerance;
typedef cv::Point2i 	Point;
typedef cv::Vec6f 		Entropy;
typedef FLOAT			Angle;

#define SIZEOF(x)		((INT) sizeof((x))/sizeof((x[0])))

#ifdef TRACE
	#define _TRACE (std::cerr << "[File: " << __FILE__ << " Line: " << \
	                               __LINE__ << " Func: " << __FUNCTION__ << \
	                               std::endl)
#else
	#define _TRACE ((VOID)0)
#endif  // TRACE
#endif  // SOURCE_DEFS_H_
